package java19_1_8.abstract_test;

/**
 * @author yuisama
 * @date 2022/01/08 09:30
 **/
abstract class A {
    public A() {
        this.print();
    }
    // 抽象方法
    public abstract void print();
}
public class B extends A{
    int num = 10;
    public B(int num) {
        this.num = num;
    }
    @Override
    public void print() {
        System.out.println("num = " + this.num);
    }
    public static void main(String[] args) {
        new B(100);
    }
}